// component

import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
import ReactDOM  from 'react-dom';
import { Route, withRouter, Switch, Redirect ,BrowserRouter,NavLink} from 'react-router-dom';
import { Timeline,Tag,Icon,Flex} from 'weaver-mobile';
import { ListViewPage } from 'weaver-mobile-page';
import {toJS} from 'mobx';
import { Base64 } from 'js-base64';
import { asyncComponent } from 'react-async-component';
import {CommonText} from '../../governTools/comText/text';
const commonText = new CommonText();

const coms = {
  OpinionPage: asyncComponent({
    resolve: () => import("../pages/opinionPage")
  }),
  OpinionChildPage: asyncComponent({
    resolve: () => import("../pages/opinionChildPage")
  }),
  // EditPage: asyncComponent({
  //   resolve: () => import("../pages/addPages/editPage")
  // }),
}
//作废组件
@withRouter
export default class OpinionLayout extends Component {
  constructor(props) {
    super(props);
  }
  componentDidMount() {

  }
  componentWillReceiveProps(nextProps){
  }
  render() {
    const {match,location} = this.props;
    return (
      <div className='g-opinionLayout'>
        <Switch>
          <Route path={match.path} exact component={coms.OpinionPage} />
          <Route path={`${match.path}/opinionChild`} component={coms.OpinionChildPage}/>
          {/*<Route path={`${match.path}/:edit`}  component={coms.EditPage}/>*/}
        </Switch>
      </div>
    );
  }
}
